1. Field of the Invention
The present invention relates to a redundant-arrays-of-independent-disks (RAID) system.
2. Description of the Related Art
A Redundant Array of Independent Disks (RAID) is a family of techniques for managing multiple disks to deliver desirable cost, data availability, and performance characteristics to host environments. The RAID system allows for generating parity data from write data, and distributing and recording the write data and the parity data into a plurality of disk devices. According to the RAID system, if a read error occurs in any one of the disk devices while the data is read, the data is restored on the basis of read data and parity data stored in at least one other of the disk devices. It is few or rare that RAID cannot read data.
When the disk device writes data in the disk, a write error might be generated. The write error can have various causes. For example interface error, defect of disk and a vibration. If the write error occurs in a known disk device, the disk device itself makes a retry. If data writing is succeeded by making the retry, a host device is informed that the write error is recovered. The disk device is used for storing the data, as it is, except in cases where a large number of the write errors occur.
If the write error is not recovered even though the disk device itself makes the retry, the disk device informs the host device that the write error is not recovered, and the host device makes a retry for the part corresponding to the unrecovered write error. If the unrecovered write error is recovered, the disk device is used, as it is, except in cases where a large number of the write errors occur.
Further, if the host device makes a retry for the part corresponding to the unrecovered write error, it is determined that the part corresponds to a defect in a recording medium onto which data is recorded. Therefore, alternating processing is performed, for example, so as to determine the part to be a predetermined area on another medium.
However, as recording mediums increase in capacity, the density of tracks on the recording mediums have become increasingly high, as is the case with a medium 100 shown in FIG. 6. A head 104 is provided in a magnetic-disk device used for writing and/or reading data into and/or from a medium. The head 104 is positioned on a track 101 into which data is written, the track 101 being provided on the medium 100. If a vibration including an external vibration, a vibration inherent in a head arm, and so forth occurs while data writing is performed under the above-described circumstances, the head 104 is shifted to an adjacent track 102, or an adjacent track 103, as indicated by a trail 105.
The impact of the above-described write error is higher than that of an ordinary write error. Namely, the above-described write error may affect data recorded into the adjacent tracks and/or adjacent sectors.
For example, even though data recovery is performed at a position where the write error occurs, data may be erroneously written into the adjacent tracks and/or the adjacent sectors. In that case, an error occurs while data reading is performed.
Usually, a predetermined number of retries are made when a read error occurs. In the above-described case, however, it is difficult to read the erroneous data written into the adjacent tracks and/or the adjacent sectors because of earlier write error in adjacent track/sectors, even though the retries are made. Further, it could be determined that the position corresponding to the read error to be a defect in the medium, and alternating processing or the like is performed. For example, subsequently, an alternate area is consumed in vain.
If the read error occurs in an area adjacent to an area where the write error occurs, the read error can be recovered by performing data rewriting. For performing the data rewriting, however, there is a need to request a host device to transmit the data again, which increases processing load on the host device.
In the past, if external power such as shock is applied onto a disk device while data is recorded, incorrect data is often recorded. There have been disclosed methods for solving the above-described problem, as is the case with Japanese Unexamined Patent Application Publication No. 6-52635. Namely, when a write error is detected while data is recorded, a data-rewrite operation is executed for a sector with the same address as that of a sector where the write error is detected in two record tracks adjacent to a target track.
According to known technologies, it is requested that a host device transmit data again, the data being stored in a sector at the same position as that of the track adjacent to the sector where the write error is detected. Subsequently, processing load on the host device increases.
On the other hand, the RAID system allows for restoring the data corresponding to the read error. However, the RAID system is configured without consideration of an effect produced by the write error on an area adjacent to an area where the write error occurs.